<?php
namespace Tools;
use Think\Controller;
class TestController extends Controller {
    
    public function __construct() {
        parent::__construct();
        if(!session('name')){
            $this->redirect('index/add',array(),1,'请先登录！');
        }
        
    }
    
}